|
|
|
|
|
|
|
);
// add some records to work with
INSERT INTO Table1 VALUES
('R01',
'Simmons',
'Chris',
'LOCAL',
'3000',
#12/15/95#
);
INSERT INTO Table1 VALUES
('R02',
'Walters',
'Curtis',
'INTL',
'5000',
#11/30/95#
);
INSERT INTO Table1 VALUES
('R03',
'Austin',
'Moro',
'INTL',
'4500',
#01/15/96#
);
// show loaded table
SELECT * FROM Table1 AS FirstPass;
// now delete LOCAL records
DELETE FROM Table1
WHERE RecType = 'INTL' AND LastPaid > #12/31/95#;
// show results
SELECT * FROM Table1 AS SecondPass;
// eof |
|
|
|
|
|
|
|
|
As you can see from the code in Listing 15.12, you only need to change the WHERE clause (adding the date criteria) in order to make the DELETE statement function as planned. |
|
|
|
|
| |
|
|
|
|
You might have noticed that you enclose date information with the pound symbol (#). This ensures that Microsoft Jet handles the data as DATE type values. Using the pound symbol works across language settings within the Windows operating system. This means that if you ship your program to Europe, where many countries use the date format DD/MM/YY (instead of the U.S. standard MM/DD/YY), Windows converts the date information to display and compute properly for the regional settings on the local PC. |
|
|
|
|
|
|
|